home *** CD-ROM | disk | FTP | other *** search
/ Over 1,000 Windows 95 Programs / Over 1000 Windows 95 Programs (Microforum) (Disc 1).iso / 0767 / winsock.if < prev    next >
Text File  |  1995-06-21  |  4KB  |  60 lines

  1. { WinSock interface file to be included the interface section
  2.     of a Delphi unit. }
  3.  
  4.   function accept (s : TSock; addr : PSockaddr; addrlen : PInteger) : TSock;
  5.   function bind (s : TSock; addr : Psockaddr; namelen : integer) : integer;
  6.   function closesocket (s : TSock) : integer;
  7.     function connect (s : TSock; name : Psockaddr; namelen : integer) : integer;
  8.   function ioctlsocket (s : TSock; cmd : longint; var argp) : integer;
  9.     function getpeername (s : TSock; name : Psockaddr; namelen : Pinteger) : integer;
  10.     function getsockname (s : TSock; name : Psockaddr; namelen : Pinteger) : integer;
  11.   function getsockopt (s : TSock; level, optname : integer; optval : PChar; optlen : integer) : integer;
  12.   function htonl (hostlong : u_long) : u_long;
  13.   function htons (hostshort : u_short) : u_short;
  14.   function inet_addr (cp : PChar) : u_long; {PIn_Addr;}  { in_addr }
  15.   function inet_ntoa (inaddr : in_addr) : PChar;
  16.   function listen (s : TSock; backlog : integer) : integer;
  17.   function ntohl (netlong : u_long) : u_long;
  18.   function ntohs (netshort : u_short) : u_short;
  19.   function recv (s : TSock; buf : PChar; len, flags : integer) : integer;
  20.   function recvfrom (s : TSock; buf : PChar; len, flags : integer; from : sockaddr; fromlen : integer) : integer;
  21.   function select (nfds : integer; readfds, writefds, exceptfds : fd_set; timeout : timeval) : longint;
  22.   function send (s : TSock; buf : PChar; len, flags : integer) : integer;
  23.   function sendto (s : TSock; buf : PChar; len, flags : integer; addrto : sockaddr; tolen : integer) : integer;
  24.   function setsockopt (s : TSock; level, optname : integer; optval : PChar; optlen : integer) : integer;
  25.   function shutdown (s : TSock; how : integer) : integer;
  26.   function socket (af, struct, protocol : integer) : TSock;
  27.   function gethostbyaddr (addr : PChar; len, struct : integer) : PHostEnt; { hostent }
  28.   function gethostbyname (name : PChar) : PHostEnt; { hostent }
  29.   function gethostname (name : PChar; len : integer) : integer;
  30.   function getservbyport (port : integer; proto : PChar) : PServEnt; { servent }
  31.   function getservbyname (name, proto : PChar) : PServEnt; { servent }
  32.   function getprotobynumber (proto : integer) : PProtoEnt; { protoent }
  33.   function getprotobyname (name : PChar) : PProtoEnt; { protoent }
  34.   function WSAStartup (wVersionRequired : word; lpWSData : LPWSADATA) : integer;
  35.   function WSACleanup : integer;
  36.   procedure WSASetLastError (iError : integer);
  37.   function WSAGetLastError : integer;
  38.   function WSAIsBlocking : BOOL;
  39.   function WSAUnhookBlockingHook : integer;
  40.   function WSASetBlockingHook (lpBlockFunc : TFarProc) : TFarProc;
  41.   function WSACancelBlockingCall : integer;
  42.   function WSAAsyncGetServByName (HWindow : HWND; wMsg : u_int; name, proto, buf : PChar; buflen : integer) : THandle;
  43.   function WSAAsyncGetServByPort ( HWindow : HWND; wMsg, port : u_int; proto, buf : PChar; buflen : integer) : THandle;
  44.   function WSAAsyncGetProtoByName (HWindow : HWND; wMsg : u_int; name, buf : PChar; buflen : integer) : THandle;
  45.   function WSAAsyncGetProtoByNumber (HWindow : HWND; wMsg : u_int; number : integer;
  46.                                       buf : PChar; buflen : integer) : THandle;
  47.   function WSAAsyncGetHostByName (HWindow : HWND; wMsg : u_int; name, buf : PChar; buflen : integer) : THandle;
  48.   function WSAAsyncGetHostByAddr (HWindow : HWND; wMsg : u_int; addr : PChar; len, struct : integer;
  49.                                   buf : PChar; buflen : integer) : THandle;
  50.   function WSACancelAsyncRequest (hAsyncTaskHandle : THandle) : integer;
  51.   function WSAAsyncSelect (s : TSock; HWindow : HWND; wMsg : u_int; lEvent : longint) : integer;
  52.  
  53.  
  54. function WSAMakeSyncReply (Buflen, Error : Word) : LongInt;
  55. function WSAMakeSelectReply (Event, Error : Word) : LongInt;
  56. function WSAGetAsyncBuflen (Param : LongInt) : Word;
  57. function WSAGetAsyncError (Param : LongInt) : Word;
  58. function WSAGetSelectEvent (Param : LongInt) : Word;
  59. function WSAGetSelectError (Param : LongInt) : Word;
  60.